*{margin: 0;padding:0;box-sizing: border-box;}

body{
    height: 100vh;
}
canvas{
    width: 100%;
    height: 100%;
    background: url('./img/grid.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: fixed;
    // z-index: -1;
}
h3{
    position: absolute;
    width: 100%;
    line-height: 45px;
    background: white;
    text-align: center;
    border-bottom: 0.7px solid #e8e8e8;
}

.nav{
    position: absolute;
    top: 46px;
    background: white;
    display: flex;
    justify-content: space-between;
    // padding: 7px;
    border-bottom: 0.7px solid #e8e8e8;
    width: 100%;
    .bgChange{margin: 5px;}
    .tool{margin: 5px;}
    .drawingBoard{
        display: flex;
        .sizes{margin: auto;}
        .palette{
            margin: auto 5px;
            display: inline;
            list-style: none;
            li{
                width: 34px;
                height: 34px;
                border-radius: 50%;
                border: none;
                display: inline-block;
                margin: auto 3px;
                cursor: pointer;
                overflow: hidden;
                position: relative;
                &:nth-child(1){
                    background: black;
                }
                &:nth-child(2){
                    background: gray;
                }
                &:nth-child(3){
                    background: rgb(185, 185, 185);
                }
                &:nth-child(4){
                    background: blue;
                }
                &:nth-child(5){
                    background: green;
                }
                &:nth-child(6){
                    background: red;
                }
                &:nth-child(7){
                    background: yellow;
                }
                &:nth-child(8){
                    // border: 1px dashed rgb(185, 185, 185);
                    box-shadow: 0px 0px 1px 0px rgba(115,113,115,1);
                    &.active{
                        border: none;
                    }
                    
                }
                
                #colorPicker{
                width: 45px;
                height: 47px;
                margin: -6px;
                border: none;
                cursor: pointer;
                }
                &.active{
                    box-shadow: 0px 1px 12px -3px rgba(0, 0, 0, 1);
                    border: 1px solid #b9b9b9;
                }
            }
        }
    }
}
input[type="color" i]{
    border: none;
    appearance: none; 
}
button,input:focus{
    outline: none;
}
@media (min-width:450px){
    .thickness{
        display: none;
        position: absolute;
        
        li{
            // display: inline-block;
            padding: 6px 0;
            margin: 0 6px;
        }
    }
}
.thickness{
    list-style: none;
    width: 60px;
        border-radius: 3px;
        border: 1px solid white;
        background: white;
        box-shadow: 0px 1px 12px -4px rgba(0,0,0,0.75);
    li{
        padding: 6px 0;
        margin: 0 6px;
        background: white;
        cursor: pointer;
        &:nth-child(1){
            border-bottom: 2px solid black;
        }
        &:nth-child(2){
            border-bottom: 4px solid black;
        }
        &:nth-child(3){
            border-bottom: 6px solid black;
        }
        &:nth-child(4){
            border-bottom: 8px solid black;
            margin-bottom: 7px;
        }
    }
}

.sizes.active >ol{
    display: block;
}

.icon{
    width: 28px;
    height: 28px;
    margin: auto 5px;
    cursor: pointer;
    &.active{
        transform: scale(1.2);
    }
}

.bgChange > button{
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #f6f7f8;
    &.grid{
    background:center url(./img/smallgrid.png);
    background-size: 110%;
    }
    &.white{
        background: white;
    }
}
.tool > button{
    padding: 4px 25px;
    border: none;
    border-radius: 5px;
    &#clear{
        background: #1a9fff;
        &:active{
            background: #1583d1;
        }
    }
    &.save{
        background: #cb4a32;
        &:active{
            background: #9b3726;
        }
    }
    .toolIcon{
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 449px){
    h3{
        width: 17%;
        font-size: 12px;
        line-height: 30px;
        height: 5vh;
    border-right: 0.7px solid #e8e8e8;
    }
    .nav{
        top: 5vh;
        display: block;
        flex-direction: column;
        border-right: 0.7px solid #e8e8e8;
        width: 17%;
        height: 95vh;
        .bgChange{text-align: center;}
        .tool{text-align: center;}
        .drawingBoard{
            display: inline-block;
            text-align: center;
            
            .palette{
                margin: 0;
                li{
                    width: 30px;
                    height: 30px;
                }
            }
        }
    }
    .sizes{
        position: relative;
        &.sizes>ol{
            display: none;
            position: absolute;
            top: 0;
            left: 50px;
        }
    }
    
    .bgChange > button{
        width: 30px;
        height: 30px;
        &.white{
            background: white;
            margin: 6px 0;
            margin-left: 0;
        }
    }
    .icon{
        margin: 6px auto;
        width: 25px;
        height: 25px;
        display: block;
    }
    .tool > button{
        padding: 5px 8px;
        margin-top: 10px;
        .toolIcon{
            width: 24px;
            height: 24px;
        }
        
    }
}
@media (max-width: 321px){
    .tool > button{
        padding: 2px 8px;
        margin-top: 5px;
        
    }
}
